package service.impl;

import dao.UserDao;
import dao.impl.UserDaoImpl;
import entity.User;
import service.UserService;

public class UserServiceImpl implements UserService {
    UserDao userdao = new UserDaoImpl();
    User user = new User();

    @Override
    public User login(String uname) {

        return userdao.findUser(uname);

    }

    @Override
    public boolean register(User user) {

        int i = userdao.addUser(user);

        return (i!=0)?true:false;
    }


}


